Inline CSS Not Centering

Up vote 0 down vote favorite share g+ share fb share tw.

I have read other questions on stackoverflow about centering and have used this technique before. I tried using: content in here This did not center the div. What have I done wrong?

I feel like I have used this code before, but it will not work this time. I tried making a new html file, and I tried it in case I had done something wrong on this particular page. It was flawed as well.

How is it wrong? Css div center link|improve this question asked Apr 19 '11 at 0:43Jack1.

Get rid of position: absolute. JsFiddle. BTW, it as nothing to do with the fact the styles are inline.

Thanks for the link to the tool. – Jack Apr 19 '11 at 0:54.

The auto margin trick doesn't work for elements that have absolute positioning. Try the following instead: width: 1000px; position: absolute; top: 300px; left: 50%; margin-left: -500px; This works by centring the LHS of the element using left: 50% then centering the element by using a negative margin of exactly half it's width.

– Jack Apr 19 '11 at 0:54 This is a valid solution for centre aligning a absolutely positioned element. The same technique works for vertical alignment. Google – Ben Rowe Apr 19 '11 at 1:34.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.